//封装一个函数
function server(port, callback){
    const http = require('http');

    const server = http.createServer(callback);

    server.listen(port, () => {
        console.log('server is running....');
    });
}

module.exports = server;